package ReaderAndWriter;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class OutputStreamWriterDemo {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("funCode\\fos.txt"));

        // 写个字符
//        osw.write(97);
//        osw.flush();
//        osw.write(98);
//        osw.write(99);
//        osw.close();
//        osw.write(99);
        //Stream closed
        char[] chars = {'a','b'};
        osw.write(chars,0,1);



        osw.close();

    }
}
